package cn.mill.core.node;

import cn.mill.common.Node;
import cn.mill.core.Constants;

public class DefaultNode implements Node {
	private String protocol;
	private int port = 0;
	private String host = "";
	private String path = "";
	private String username;
	private String password;
	
	public DefaultNode() {
		this.protocol = Constants.DEFAULT_PROTOCOL;
	}
	
	public DefaultNode(String protocol, int port, String host, String path) {
		this.protocol = protocol;
		this.port = port;
		this.host = host;
		this.path = path;
	}
	
	@Override
	public String protocol() {
		return this.protocol;
	}
	
	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}
	
	@Override
	public int port() {
		return port;
	}
	
	public void setPort(int port) {
		this.port = port;
	}
	
	@Override
	public String host() {
		return host;
	}
	
	public void setHost(String host) {
		this.host = host;
	}
	
	@Override
	public String path() {
		return path;
	}
	
	public void setPath(String path) {
		this.path = path;
	}
	
	@Override
	public String username() {
		return username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	@Override
	public String password() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	@Override
	public String toString() {
		return "DefaultNode [protocol=" + protocol + ", port=" + port + ", host=" + host + ", path=" + path + ", username=" + username + ", password=" + password + "]";
	}
	
}
